package chixing.day06.homework;

public class OnlineOrder extends Order{
    private String email;//买家邮箱

    public OnlineOrder(){}

    public OnlineOrder(String email) {
        this.email = email;
    }

    public OnlineOrder(int orderId, double amount, String email) {
        super(orderId, amount);
        this.email = email;
    }

    /**
     * 打印订单编号、金额和买家邮箱
     */
    public void printOlineOrder(){
        System.out.println(
                "订单编号:" + getOrderId() + "订单金额:" + getAmount() + "买家邮箱" + email
        );
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        return "OnlineOrder{" +
                "email='" + email + '\'' +
                '}';
    }
}
